/** Button组件基本样式 */
.btn {
    position: relative;
    display: inline-block;
    font-weight: $btn-font-weight;
    line-height: $btn-line-height;
    color: $body-color;
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
    background-image: none;
    border: $btn-border-width solid transparent;
    padding: $btn-padding-y $btn-padding-x;
    font-size: $btn-font-size;
    border-radius: $btn-border-radius;
    box-shadow: $btn-box-shadow;
    cursor: pointer;
    transition: $btn-transition;

    // 禁用状态
    &.is-disabled,
    &[disabled] {
        cursor: not-allowed;
        opacity: $btn-disabled-opacity;
        box-shadow: none;

        >* {
            pointer-events: none;
        }
    }
}

/** 大尺寸的Button */
.btn-lg {
    @include button-size(
        $btn-padding-x-lg,
        $btn-padding-y-lg,
        $btn-font-size-lg,
        $btn-border-radius-lg 
    )
}

/** 小尺寸的Button */
.btn-sm {
    @include button-size(
        $btn-padding-x-sm,
        $btn-padding-y-sm,
        $btn-font-size-sm,
        $btn-border-radius-sm
    )
}

/** 主Button */
.btn-primary {
    @include button-style(
        $primary,
        $primary,
        $white
    )
}

/** 警告Button */
.btn-danger {
    @include button-style(
        $danger,
        $danger,
        $white
    ) 
}

/** 普通Button */
.btn-default {
    @include button-style(
        $white,
        $gray-400,
        $body-color,
        $white,
        $primary,
        $primary,
    ) 
}

/** 链接Button */
.btn-link {
    font-weight: $font-weight-normal;
    color: $btn-link-color;
    text-decoration: $link-decoration;
    box-shadow: none;
    &:hover {
        color: $btn-link-hover-color;
        text-decoration: $link-hover-decoration;
    }
    &:focus,
    &.focus {
        color: $btn-link-hover-color;
        text-decoration: $link-hover-decoration;
    }
    &:disabled,
    &.is-disabled {
        color: $btn-link-disabled-color;
        pointer-events: none;
    }
}